package com.lwww.infinitechat.authenticationservice.constants.user;

import com.lwww.infinitechat.authenticationservice.constants.status.StatusConstant;
import lombok.Getter;

@Getter
public enum ErrorEnum {

    //注册错误
    REGISTER_ERROR(StatusConstant.CLIENT_ERROR_CODE,"注册失败，用户已存在"),

    //验证码错误
    REGISTER_CODE_ERROR(StatusConstant.CLIENT_ERROR_CODE,"注册失败,验证码错误"),

    //登录错误
    LOGIN_ERROR(StatusConstant.CLIENT_ERROR_CODE,"登录失败，用户不存在或密码错误"),

    //验证码错误
    LOGIN_CODE_ERROR(StatusConstant.CLIENT_ERROR_CODE,"登录失败,用户不存在或验证码错误"),

    //更新用户头像错误
    UPDATE_AVATAR_ERROR(StatusConstant.CLIENT_ERROR_CODE,"更新用户头像失败" ),

    //用户不存在
    NO_USER_ERROR(StatusConstant.CLIENT_ERROR_CODE, "用户不存在"),

    //服务器异常
    SERVER_ERROR(StatusConstant.SERVER_ERROR_CODE,"服务器异常"),

    //保存用户失败
    SAVE_USER_ERROR(StatusConstant.SERVER_ERROR_CODE, "保存用户失败");





    private final int code;

    private String message;

    ErrorEnum(int code,String msg){
        this.code=code;
        this.message=msg;
    }
}
